package com.likou.written.yuxin;

import java.util.*;

/**
 * Author: 陈桂明
 * Date: 2025/9/27 20:21
 * Description: yuxin1
 */
public class yuxin1 {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // // 注意 hasNext 和 hasNextLine 的区别
        // while (in.hasNextInt()) { // 注意 while 处理多个 case
        //     int a = in.nextInt();
        //     int b = in.nextInt();
        //     System.out.println(a + b);
        // }

        int n = in.nextInt();
        List<Integer> list = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            list.add(in.nextInt());
        }
        Set<Integer> set = new HashSet<>();
        int ans = 0;
        for (Integer num : list) {
            if (set.contains(num)) {
                ans++;
            }
            set.add(num);
        }

        System.out.println(ans);
    }
}
